#include "stdio.h"

const int g_grade_count = 3;
const int g_student_count = 3;

struct Score
{
    float math;
    float english;
    float chinese;
};

typedef struct Student{
    char name[20];
    int age;
    struct Score score;
}Stu;

float average_score(Stu stu) {
    return (stu.score.math + stu.score.english + stu.score.chinese) / g_grade_count;
}

int main() {
    Stu stu[3] =  {"zhangsan", 18, {90.5f, 76.3f, 82.4f}};

    printf("average score is %.2f\n", average_score(stu[0]));


    return 0;
}